
// 自定义错误类型
class AppError extends Error {
  constructor(
    public msg: string,
    public code: number = 500
  ) {
    super(msg);
  }
}